{% extends "menu.html" %}
{% block content %}

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">



            </div>
            <div class="clearfix"></div>
            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>新增域名key </h2>

                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <br />
                    <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post">
                        {% csrf_token %}
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name"> idnum<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="idnum">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">key值 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="text" id="last-name" name="key" required="required" class="form-control col-md-7 col-xs-12">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">key名字 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="text" id="last-name" name="key_name" required="required" class="form-control col-md-7 col-xs-12">
                        </div>
                      </div>

                        <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">所属服务商<span class="required">*</span></label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select name="domain_type" class="col-md-6 col-sm-6 col-xs-12" size="3" style="width: 100%" required>
                              <option value ="dnspod">dnspod</option>
                          </select>
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">描述 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <textarea type="" id="last-name" name="description" required="required" class="form-control col-md-7 col-xs-12" placeholder="输入该key下的域名"></textarea>
                        </div>
                      </div>

                        <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12"></label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <span>{{ result }}</span>
                        </div>
                      </div>
                      <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                          <button class="btn btn-primary" type="button">Cancel</button>
						  <button class="btn btn-primary" type="reset">Reset</button>
                          <button type="submit" class="btn btn-success">Submit</button>
                        </div>
                      </div>

                    </form>
                  </div>
                </div>
              </div>
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>key列表 </h2>

                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <div class="table-responsive">
                      <table class="table table-striped jambo_table bulk_action">
                        <thead>
                          <tr class="headings">
                            <th class="column-title">ID </th>
                            <th class="column-title">idnum </th>
                            <th class="column-title">key_name</th>
                            <th class="column-title">type </th>
                            <th class="column-title">description </th>
                            <th class="column-title">管理 </th>
                          </tr>
                        </thead>

                        <tbody>
                        {% for key in key_list %}
                          <tr class="even pointer">

                            <td class=" ">{{ key.id }}</td>
                              <td class=" ">{{ key.idnum }}</td>
                            <td class=" ">{{ key.key_name }}</td>
                            <td class=" ">{{ key.domaintype }} </td>
                              <td>{{ key.description }}</td>
                            <td class=" "><a href="/domain/addkey/?status=del&id={{ key.id }}">删除</a>
                                |<a href="/domain/fun/?domaintype={{ key.domaintype }}&id={{ key.id }}">查看</a>|
                            <a href="/domain/fun/?domaintype={{ key.domaintype }}&id={{ key.id }}&status=refresh">刷新</a></td>

                            </td>
                          </tr>
                        {% endfor %}


                        </tbody>
                      </table>
                    </div>

                  </div>
                </div>
              </div>
            </div>


          </div>
        </div>
{% endblock %}